import request from '@/utils/request'


export function getUserPageInfos(data) {
  return request({
    url: '/device/getInfoList',
    method: 'GET',
    params: data
  })
}


export function deleteDevice(trainId) {
  return request({
    url: '/trainInfo/deleteTrainInfo',
    method: 'POST',
    params: { trainId: trainId }
  })
}

export function createOrUpdate(data) {
  return request({
    url: '/trainInfo/addOrUpdateTrainInfor',
    method: 'POST',
    data: data
  })
}


export function TWS(id) {
  return request({
    url: '/tws-rt/TWS_Entitys',
    method: 'get',
    params: { deviceType: id }
  })
} 

export function getuserInfo(id) {
  return request({
    url: '/user/getInfo',
    method: 'get',
    params: { userId: id }
  })
} 


export function getNetState(deviceIds,deviceType) {
  return request({
    url: '/status/getInitDeviceState',
    method: 'get',
    params: { deviceIds: JSON.stringify(deviceIds),deviceType:deviceType }
  })
} 